const postcss = require('postcss');
const fs = require('fs');
const path = require('path');

let code = fs.readFileSync(path.resolve(__dirname, 'test.scss'), 'utf-8');
let root = postcss.parse(code);
root.walkAtRules(rule => {
  if (rule.name === 'import') {
    // console.log(rule.params);
    rule.params = './test.css';
  }
});

console.log(root.toString());
